<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.business.music.*" %>
<%@ page import="com.beans.music.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%String title="修改音乐信息"; %>
<script	type="javascript">
function check() {	
return true;
}
</script>
<%@include file="header.jsp" %>
<%String musicNo=request.getParameter("no"); 
	MusicListBus mlb=new MusicListBus(); 
	MusicInfo mi=mlb.getMusicByNo(musicNo); 
%>
<form action="editmusic" method="post" enctype="multipart/form-data" name="addmusicform"  id="addmusicform" onsubmit="return check()">
  <p><b>您将添加音乐到服务器上：</b></p>
  <p >音乐名：
    <label>
    <input name="musicname" type="text" id="musicname" value="<%=mi.getMusicName()%>" />
    </label>
  </p>
  <p >备注：</p>
  <label>
  <textarea name="musicmemo" cols="40" rows="4" id="musicmemo"><%=mi.getMusicMemo()%></textarea>
  </label>
  <p >所在音乐盒：
    <label>
	<select name="musictypeid" >
	<%
	MusicTypeBus mtl=new MusicTypeBus();
	List typeList=mtl.getAllTypes(username);
	for(int i=0;i<typeList.size();i++) {
	MusicType mt=(MusicType)typeList.get(i);
	%>
	<option value="<%=mt.getMusictypeId()%>" <%if(mi.getMusictypeId().equals(mt.getMusictypeId())){%>selected<%}%>><%=mt.getMusictypeName()%></option>
	<%
	}
	%>
	</select>
	</label>
  </p>
  <p>是否显示
    <label>
    <input name="isshow" type="checkbox" id="isshow" value="1" <%if(mi.getIsShow().equals("1")){%>checked="checked" <%}%> />
    </label>
       <input name="username" type="hidden" id="username" value="<%=username%>" />
	    <input name="no" type="hidden" value="<%=musicNo%>"/>
  </p>
  <label>上传的音乐文件：
    <input type="file" name="file" accept=".mp3" />(最大10M）
	<input name="musicUrl" type="hidden" value="<%=mi.getMusicUrl()%>" />
  </label>
      <p>此音乐相关信息填写：（选填）</p>
      <p>音乐专辑名：
        <label>
        <input name="classname" type="text" id="classname" value="<%=mi.getClassName()%>"/>
        </label>
      </p>
      <p>歌手名：
        <label>
        <input name="singer" type="text" id="singer"  value="<%=mi.getSinger()%>"/>
        </label>
      </p>
	   <p>歌词上传：
        <label>
        <input name="file" type="file"   />
        (请使用txt文件)
		<input name="lrcUrl" type="hidden" value="<%=mi.getLrcUrl()%>" />
        </label>
      </p>
      <p>
   <label>
		<br />
 &nbsp; <input type="image" src="images/submit.gif" />
      </label>
</p>
    <p>&nbsp; </p>
    <p>
    <label></label>
</p>
</form>
<%@include file="footer.jsp"%>
</body>

</html>
